<div class="layui-fluid">
    <div class="layui-card">
      <div class="layui-card-body">
        <form class="layui-form" action="<?=url('tbkcat/edit');?>">
            <input type="hidden" name="id" value="<?=$info['id']?>" />
            <div class="layui-form-item">
              <label class="layui-form-label">分类标题</label>
              <div class="layui-input-block">
                <input type="text" name="cat_title" value="<?=$info['cat_title']?>" required lay-verify="required" placeholder="请输入分类标题" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">封面图</label>
              <div class="layui-input-block">
                  <button type="button" class="layui-btn" id="myupimg">
                    <i class="layui-icon">&#xe67c;</i>上传图片
                  </button>
                  <input type="hidden" name="pic" value="<?=$info['pic']?>" />
                  <div style="display:inline-block;position:relative;">
                      <span style="position:absolute;right:-15px; top:-15px;cursor:pointer;color:#ccc;font-size:24px;<?php if(!$info['pic']):?>display:none;<?php endif;?>" id="closeimg">x</span>
                      <img id="pic" height=50 src="<?=$info['pic']?>" />
                  </div>
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">推荐位ID</label>
              <div class="layui-input-block">
                <input type="text" name="adzone_id" value="<?=$info['adzone_id']?>" value="<?=$info['adzone_id']?>" required lay-verify="required" placeholder="请输入推荐位ID" autocomplete="off" class="layui-input">
              </div>
            </div>
            <div class="layui-form-item">
              <label class="layui-form-label">选品库ID</label>
              <div class="layui-input-block">
                <?php foreach($xpk as $k=>$v):?>
                  <input type="checkbox" name="favorites_id[<?=$k?>]" <?php if(strpos($info['favorites_id'],(string)$v['favorites_id'])!==false):?>checked=true<?php endif;?> required lay-verify="required" value="<?=$v['favorites_id']?>" title="<?=$v['favorites_title']?>">
                <?php endforeach;?>
              </div>
            </div>

          <div class="layui-form-item">
            <div class="layui-input-block">
              <button class="layui-btn" lay-submit lay-filter="myform">立即提交</button>
              <button type="reset" class="layui-btn layui-btn-primary">重置</button>
            </div>
          </div>
        </form>
      </div>
    </div>
</div>
<script>
layui.use(['form'], function(){
  var $ = layui.$
  ,form = layui.form;
  form.render();
  var ue = UE.getEditor('container');
});
</script>
